﻿using UnityEditor;
using UnityEditor.UI;
using UnityEngine;

namespace Jerry.UiFrame.Editor
{
    [CanEditMultipleObjects, CustomEditor(typeof(JListGrid), true)]
    public class JListGridEditor : SelectableEditor
    {
        private SerializedProperty selected;

        protected override void OnEnable()
        {
            base.OnEnable();
            selected = serializedObject.FindProperty("selected");
        }

        public override void OnInspectorGUI()
        {
            serializedObject.Update();
            EditorGUILayout.PropertyField(selected);
            EditorGUILayout.Space(10);
            serializedObject.ApplyModifiedProperties();

            base.OnInspectorGUI();
        }
    }
}